package cn.itrip.dao.mapper;

import cn.itrip.beans.pojo.ItripComment;
import cn.itrip.beans.pojo.ItripHotelRoom;
import cn.itrip.beans.pojo.ItripImage;
import cn.itrip.beans.vo.HotelScore;
import cn.itrip.beans.vo.ItripCommentPage;
import cn.itrip.beans.vo.QueryComment;

import java.util.List;

public interface ItripCommentMapper {

    /**
     *添加点评
     * @param record
     * @return
     * @throws Exception
     */
    int insert(ItripComment record)throws  Exception;



    ItripComment selectByPrimaryKey(Long id)throws  Exception;

    int updateByPrimaryKeySelective(ItripComment record)throws  Exception;

    int updateByPrimaryKey(ItripComment record)throws  Exception;

    List<ItripComment> selectCommentList(ItripCommentPage itripCommentPage)throws  Exception;


    List<ItripComment> selectCommentDesc(long id)throws Exception;

    /**
     * 查询评论列表
     * @param queryComment
     * @return
     * @throws Exception
     */
    long selectCommentCount(QueryComment queryComment)throws  Exception;

    long getIsHavingImg(long id)throws  Exception;

    long getisOkNO(long id)throws  Exception;

    long getisOkYES(long id)throws  Exception;

    long getAllCount(long id)throws  Exception;
    /**
     * 获取酒店评分
     * @param id
     * @return
     * @throws Exception
     */
    HotelScore getHotelScore(long id) throws Exception;

    List<ItripHotelRoom> selectByQuery(ItripHotelRoom itripHotelRoom)throws  Exception;

    List<ItripImage> getCommentImg(long id)throws Exception;

    /**
     * 获取订单id
     * @return
     * @throws Exception
     */
    long getCommentID()throws  Exception;
}